home *** CD-ROM | disk | FTP | other *** search
- Path: zippy.dct.ac.uk!dstn25!ds
- Newsgroups: comp.lang.c++
- Subject: HELP: Calling functions from DLLs
- Message-ID: <1996Jan8.194827.23308@zippy.dct.ac.uk>
- From: ds11@st-and.ac.uk (Darren Steers)
- Date: 8 Jan 96 19:48:27 GMT
- Sender: ds@dstn25 (Darren Steers)
- Distribution: world
- Organization: University of St Andrews
- Nntp-Posting-Host: dstn25.dct.ac.uk
-
- Hi,
-
- Can you help? I have been supplied with a DLL (not source code)
- from a third party. It was compiled using MS Visual C++.
-
- I am using Borland C++ 4.5 and am having problems calling the functions
- from the third party DLL.
-
- When I wrote a simple test DLL (Beep.cpp) the function prototype and
- declaration were like this (From a book)
-
- void _FAR _EXPFUNC MakeBeep (int iCount);
-
- This worked great and I could use the function in my application
- (CallBeep.cpp) to my hearts content.
-
- HOWEVER, the 3rd party DLL had its functions declared in this style
-
- void FAR PASCAL MakeBeep (int iCount);
-
- When I try to use this function I get this error message
-
- Linker Error: Undefined symbol MakeBeep(int) in module CALLBEEP.CPP
-
- Can I get my application to recognise functions declared in the FAR PASCAL
- format, or do I need to get the source code and change the function
- prototypes and definitions to _FAR _EXPFUNC ????
-
- Thanks for any help.
-
- Darren Steers
-
- University of St Andrews
- Scotland
-
- ds11@st-and.ac.uk
-